.new-thread-page {
  min-height: 100vh;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.header-content {
  max-width: 600px;
  margin: 0 auto;
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  color: #ff6699;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.title-icon {
  font-size: 40px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.page-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 300;
}

.form-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
}

.form-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-section {
  margin-bottom: 30px;
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
}

.label-icon {
  font-size: 18px;
}

.optional {
  font-size: 14px;
  color: #6c757d;
  font-weight: 400;
}

.select-wrapper {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 16px;
  background: white;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 20px;
}

.form-select:focus {
  outline: none;
  border-color: #ff6699;
  box-shadow: 0 0 0 3px rgba(255, 102, 153, 0.1);
  transform: translateY(-2px);
}

.form-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #ff6699;
  box-shadow: 0 0 0 3px rgba(255, 102, 153, 0.1);
  transform: translateY(-2px);
}

.title-input {
  font-weight: 600;
  font-size: 18px;
}

.form-textarea {
  width: 100%;
  min-height: 200px;
  padding: 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
  line-height: 1.6;
}

.form-textarea:focus {
  outline: none;
  border-color: #ff6699;
  box-shadow: 0 0 0 3px rgba(255, 102, 153, 0.1);
  transform: translateY(-2px);
}

.char-count {
  text-align: right;
  font-size: 14px;
  color: #6c757d;
  margin-top: 8px;
}

.upload-area {
  position: relative;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.upload-label {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px;
  border: 2px dashed #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.upload-label:hover {
  border-color: #ff6699;
  background: rgba(255, 102, 153, 0.05);
  transform: translateY(-2px);
}

.upload-icon {
  font-size: 48px;
  opacity: 0.7;
}

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.upload-main {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.upload-sub {
  font-size: 14px;
  color: #6c757d;
}

.image-preview {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.preview-title {
  font-weight: 600;
  color: #2c3e50;
}

.remove-image-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
}

.remove-image-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.preview-container {
  padding: 20px;
  text-align: center;
}

.preview-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e9ecef;
}

.form-actions .btn {
  flex: 1;
  justify-content: center;
  text-align: center;
}

.btn {
  padding: 15px 30px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6699 0%, #ff4757 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 102, 153, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 102, 153, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.btn.loading {
  pointer-events: none;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-icon {
  font-size: 18px;
}

.tips-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.tips-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tips-list li {
  padding: 12px 0;
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  padding-left: 25px;
}

.tips-list li::before {
  content: "✨";
  position: absolute;
  left: 0;
  top: 12px;
  font-size: 14px;
}

.tips-list li:not(:last-child) {
  border-bottom: 1px solid #f1f3f4;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .new-thread-page {
    padding: 15px;
  }

  .page-title {
    font-size: 28px;
    flex-direction: column;
    gap: 10px;
  }

  .title-icon {
    font-size: 32px;
  }

  .page-subtitle {
    font-size: 16px;
  }

  .form-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-card {
    padding: 25px;
  }

  .tips-card {
    position: static;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .upload-label {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .upload-icon {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .form-card {
    padding: 20px;
  }

  .tips-card {
    padding: 20px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* 防止iOS缩放 */
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .form-card,
  .tips-card {
    background: rgba(255, 255, 255, 0.95);
  }
}

/* 打印样式 */
@media print {
  .new-thread-page {
    background: white;
  }

  .form-card,
  .tips-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
